
#ifndef CHESS_PIECE_H
#define CHESS_PIECE_H

#include <string>
#include <set>
#include <iostream>
#include <fstream>
#include "BoardPosition.h"
class Board;

/**
 * The ChessPlayer class provides an interface for a ChessController implementation to interact
 * with the player through, regardless of whether the player is a human or a computer.
 */
class Piece {

   public: //methods
      Piece (bool clrWhite);

      virtual ~Piece();

      bool IsWhite() const;

      virtual std::ostream& Save(std::ostream & os, int row, int col) const;

      bool IsLegal();

      virtual std::string GetType() const = 0;

      virtual std::set<BoardPosition> GetAllMoves(Board * b, BoardPosition curPos) = 0;

      virtual std::set<BoardPosition> GetLegalMoves(Board * b, BoardPosition curPos) = 0;

   private:
      bool white;
};

#endif
